package com.twang.stock.controller.common;


import com.alibaba.fastjson.JSONObject;
import com.twang.stock.Entity.ResponseEntity;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class BaseControoler {

    public ResponseEntity responseSuccess(Object data) {
        ResponseEntity responseEntity = new ResponseEntity();
        responseEntity.setMsg("操作成功");
        responseEntity.setStatus("1");
        responseEntity.setData(data);
        log.info("{}", JSONObject.toJSONString(responseEntity));
        return responseEntity;
    }
}
